package com.examination.service.safetyModel;


import com.examination.dao.safetyModel.RiskshowDao;
import com.examination.entity.Riskshow;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RiskshowService implements RiskshowDao {
    @Autowired
    private RiskshowDao riskshowDao;

    //分页模糊查询隐患风险记录
    @Override
    public List<Riskshow> findRiskshow(Map map) {
        return riskshowDao.findRiskshow(map);
    }

    //统计总条数
    @Override
    public long total(Map map) {
        return riskshowDao.total(map);
    }

    //增加隐患信息
    @Override
    public int insertRiskshow(Map map) {
        return riskshowDao.insertRiskshow(map);
    }

    //整改上报
    @Override
    public int updateRiskshow(Map map) {
        return riskshowDao.updateRiskshow(map);
    }

    //删除隐患信息
    @Override
    public int deleteRiskshow(Map map) {
        return riskshowDao.deleteRiskshow(map);
    }

    //查询个人隐患信息
    @Override
    public List<Riskshow> findRiskshowByStaffId(Map map) {
        return riskshowDao.findRiskshowByStaffId(map);
    }


    //前端展示页数据
    //查找积分前三
    @Override
    public List<Map> find_riskshow_awarda(Map map) {
        return riskshowDao.find_riskshow_awarda(map);
    }

    //积分奖励
    @Override
    public int find_riskshow_award(Map map) {
        return riskshowDao.find_riskshow_award(map);
    }

    //统计饼图(risk_id)
    @Override
    public List<Map> find_riskshow_b(Map map) {
        return riskshowDao.find_riskshow_b(map);
    }

    //统计饼图 (station_id)
    @Override
    public List<Map> find_riskshow_c(Map map) {
        return riskshowDao.find_riskshow_c(map);
    }

    //返回本月份
    @Override
    public int find_month() {
        return riskshowDao.find_month();
    }

    //查询当月上旬数据的条数
    @Override
    public int find_riskshow_top(Map map) {
        return riskshowDao.find_riskshow_top(map);
    }

    //查询当月中旬数据的条数
    @Override
    public int find_riskshow_mid(Map map) {
        return riskshowDao.find_riskshow_mid(map);
    }

    //查询当月下旬数据的条数
    @Override
    public int find_riskshow_end(Map map) {
        return riskshowDao.find_riskshow_end(map);
    }

    //查询当月上旬有效数据的条数
    @Override
    public int find_riskshow_top_y(Map map) {
        return riskshowDao.find_riskshow_top_y(map);
    }

    //查询当月中旬有效数据的条数
    @Override
    public int find_riskshow_mid_y(Map map) {
        return riskshowDao.find_riskshow_mid_y(map);
    }

    //查询当月下旬有效数据的条数
    @Override
    public int find_riskshow_end_y(Map map) {
        return riskshowDao.find_riskshow_end_y(map);
    }

    //查询当前月上传隐患的条数
    @Override
    public int count_riskshow_all(Map map) {
        return riskshowDao.count_riskshow_all(map);
    }

    //查询当前月审核通过的隐患条数
    @Override
    public int count_riskshow_true(Map map) {
        return riskshowDao.count_riskshow_true(map);
    }

    //查询个人总上传隐患数量
    @Override
    public int countRiskshowByStaffIdAll(Map map) {
        return riskshowDao.countRiskshowByStaffIdAll(map);
    }

    //查询个人本月上传隐患数量
    @Override
    public int countRiskshowByStaffIdMonth(Map map) {
        return riskshowDao.countRiskshowByStaffIdMonth(map);
    }

    //查询个人总获取积分
    @Override
    public Double sumPriceByStaffIdAll(Map map) {
        return riskshowDao.sumPriceByStaffIdAll(map);
    }

    //查询个人本月获取积分
    @Override
    public Double sumPriceByStaffIdMonth(Map map) {
        return riskshowDao.sumPriceByStaffIdMonth(map);
    }

    @Override
    public int upd_state(Map map) {
        return riskshowDao.upd_state(map);
    }


}
